import { defineStore } from 'pinia';
import { ref } from 'vue';

export const useNoticeStore = defineStore(
  'notice',
  () => {
    const hasNotice = ref<boolean>(false);
    const noticeList = ref<any[]>([]);
    function setHasNotice(isHasNotice: boolean) {
      hasNotice.value = isHasNotice;
    }
    return {
      hasNotice,
      setHasNotice,
      noticeList,
    };
  },
  {
    persist: true,
  }
);
